package com.zmovie.framework.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zmovie.framework.domain.CinemaArea;
import com.zmovie.framework.service.CinemaAreaService;
import com.zmovie.framework.mapper.CinemaAreaMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author lenovo
* @description 针对表【cinema_area】的数据库操作Service实现
* @createDate 2023-11-27 20:38:11
*/
@Service
public class CinemaAreaServiceImpl extends ServiceImpl<CinemaAreaMapper, CinemaArea>
    implements CinemaAreaService{
    @Override
    public List<CinemaArea> listCinemaAreas(CinemaArea cinemaArea) {
        LambdaQueryWrapper<CinemaArea> wrapper = new LambdaQueryWrapper<>();
        wrapper.like(cinemaArea.getName() != null, CinemaArea::getName, cinemaArea.getName());
        wrapper.orderByAsc(CinemaArea::getName);
        return list(wrapper);
    }

}




